package com.wsocket.websocket;

import org.java_websocket.WebSocketImpl;

import java.net.InetSocketAddress;
import java.net.UnknownHostException;

/**
 * @description:
 * @title: WebSocketApp
 * @author: lcMeng
 * @createDate: 2021/3/20 14:08
 * @version: 1.0
 */
public class WebSocketApp {

    public static void main(String[] args) {
        System.out.println("开始启动websocket");
        WebSocketImpl.DEBUG = false;
        int port = 8888;  // 端口随便设置，只要不跟现有端口重复就可以
        WebSocketConfigServer s = null;
        try {
            s = new WebSocketConfigServer(port);
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        s.start();
        System.out.println("启动websocket成功！");

    }
}
